const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: './',
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
  },
 devServer: {
    proxy: { // 代理
      ['/api/']: {

        target: `http://localhost:23121`,
        // target: `http://localhost:23107`,
        changeOrigin: true,
        pathRewrite: {
          ['^/api']: ''
        }
      },
	  ['/other/']: {
	  
	    target: `http://localhost:24021`,
	    // target: `http://localhost:23107`,
	    changeOrigin: true,
	    pathRewrite: {
	      ['^/other']: ''
	    }
	  },
    },
   },
   runtimeCompiler: true
}